@extends('layouts.userctl')
@section('content')
<style>
	.formpage {
		width: 60%;
		height: auto;
		margin: 10px auto;
	}
	.layui-form-label{
		width: 150px;
	}
	.layui-input-block{
		margin-left: 150px;
	}
</style>
<div class="formpage">
	<form class="layui-form" action="{{route('admin.user.addgovuser')}}" method="post" onkeypress="return event.keyCode != 13;">
		{{csrf_field()}} 
		<div class="layui-form-item">
			<label class="layui-form-label">姓名</label>
			<div class="layui-input-block">
				<input type="text" name="username" required lay-verify="required" placeholder="请输入用户姓名" autocomplete="off"
					class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">性别</label>
			<div class="layui-input-block">
				<input type="radio" name="sex" value="男" title="男" checked>
				<input type="radio" name="sex" value="女" title="女">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">身份证号</label>
			<div class="layui-input-block">
				<input type="text" name="cardnum" required lay-verify="required" placeholder="请输入身份证号" autocomplete="off"
					class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">立即提交</button>
				<button class="layui-btn layui-btn-primary" id="backpage">返  回</button>
			</div>
		</div>
	</form>
</div>
<script>
	//Demo
layui.use('form', function() {
	var form = layui.form
	$('#backpage').click(function() {
		history.back(-1)
	})
	//监听提交
	form.on('submit(formDemo)', function(data) {
		var index = layer.load(0, { shade:false })
	})
})
</script>

@endsection
